<!doctype html>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<script src="../../assert_selection.js"></script>
<script>

selection_test(
  '<div contenteditable dir="ltr" contenteditable style="width: 120px;">|before    \u05D0\u05D7\u05E8\u05D9 \u05D0\u05E0\u05E6\u05D9\u05E7\u05DC\u05D5\u05E4\u05D3\u05D9\u05D4</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr" style="width: 120px;">|before    \u05D0\u05D7\u05E8\u05D9 \u05D0\u05E0\u05E6\u05D9\u05E7\u05DC\u05D5\u05E4\u05D3\u05D9\u05D4</div>',
  '19-0 ltr left character');

selection_test(
  '<div contenteditable dir="ltr" contenteditable style="width: 120px;">b|efore    \u05D0\u05D7\u05E8\u05D9 \u05D0\u05E0\u05E6\u05D9\u05E7\u05DC\u05D5\u05E4\u05D3\u05D9\u05D4</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr" style="width: 120px;">|before    \u05D0\u05D7\u05E8\u05D9 \u05D0\u05E0\u05E6\u05D9\u05E7\u05DC\u05D5\u05E4\u05D3\u05D9\u05D4</div>',
  '19-1 ltr left character');

selection_test(
  '<div contenteditable dir="ltr" contenteditable style="width: 120px;">be|fore    \u05D0\u05D7\u05E8\u05D9 \u05D0\u05E0\u05E6\u05D9\u05E7\u05DC\u05D5\u05E4\u05D3\u05D9\u05D4</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr" style="width: 120px;">b|efore    \u05D0\u05D7\u05E8\u05D9 \u05D0\u05E0\u05E6\u05D9\u05E7\u05DC\u05D5\u05E4\u05D3\u05D9\u05D4</div>',
  '19-2 ltr left character');

selection_test(
  '<div contenteditable dir="ltr" contenteditable style="width: 120px;">bef|ore    \u05D0\u05D7\u05E8\u05D9 \u05D0\u05E0\u05E6\u05D9\u05E7\u05DC\u05D5\u05E4\u05D3\u05D9\u05D4</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr" style="width: 120px;">be|fore    \u05D0\u05D7\u05E8\u05D9 \u05D0\u05E0\u05E6\u05D9\u05E7\u05DC\u05D5\u05E4\u05D3\u05D9\u05D4</div>',
  '19-3 ltr left character');

selection_test(
  '<div contenteditable dir="ltr" contenteditable style="width: 120px;">befo|re    \u05D0\u05D7\u05E8\u05D9 \u05D0\u05E0\u05E6\u05D9\u05E7\u05DC\u05D5\u05E4\u05D3\u05D9\u05D4</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr" style="width: 120px;">bef|ore    \u05D0\u05D7\u05E8\u05D9 \u05D0\u05E0\u05E6\u05D9\u05E7\u05DC\u05D5\u05E4\u05D3\u05D9\u05D4</div>',
  '19-4 ltr left character');

selection_test(
  '<div contenteditable dir="ltr" contenteditable style="width: 120px;">befor|e    \u05D0\u05D7\u05E8\u05D9 \u05D0\u05E0\u05E6\u05D9\u05E7\u05DC\u05D5\u05E4\u05D3\u05D9\u05D4</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr" style="width: 120px;">befo|re    \u05D0\u05D7\u05E8\u05D9 \u05D0\u05E0\u05E6\u05D9\u05E7\u05DC\u05D5\u05E4\u05D3\u05D9\u05D4</div>',
  '19-5 ltr left character');

selection_test(
  '<div contenteditable dir="ltr" contenteditable style="width: 120px;">before|    \u05D0\u05D7\u05E8\u05D9 \u05D0\u05E0\u05E6\u05D9\u05E7\u05DC\u05D5\u05E4\u05D3\u05D9\u05D4</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr" style="width: 120px;">befor|e    \u05D0\u05D7\u05E8\u05D9 \u05D0\u05E0\u05E6\u05D9\u05E7\u05DC\u05D5\u05E4\u05D3\u05D9\u05D4</div>',
  '19-6 ltr left character');

selection_test(
  '<div contenteditable dir="ltr" contenteditable style="width: 120px;">before |   \u05D0\u05D7\u05E8\u05D9 \u05D0\u05E0\u05E6\u05D9\u05E7\u05DC\u05D5\u05E4\u05D3\u05D9\u05D4</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr" style="width: 120px;">before|    \u05D0\u05D7\u05E8\u05D9 \u05D0\u05E0\u05E6\u05D9\u05E7\u05DC\u05D5\u05E4\u05D3\u05D9\u05D4</div>',
  '19-7 ltr left character');

selection_test(
  '<div contenteditable dir="ltr" contenteditable style="width: 120px;">before  |  \u05D0\u05D7\u05E8\u05D9 \u05D0\u05E0\u05E6\u05D9\u05E7\u05DC\u05D5\u05E4\u05D3\u05D9\u05D4</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr" style="width: 120px;">before|    \u05D0\u05D7\u05E8\u05D9 \u05D0\u05E0\u05E6\u05D9\u05E7\u05DC\u05D5\u05E4\u05D3\u05D9\u05D4</div>',
  '19-8 ltr left character');

selection_test(
  '<div contenteditable dir="ltr" contenteditable style="width: 120px;">before   | \u05D0\u05D7\u05E8\u05D9 \u05D0\u05E0\u05E6\u05D9\u05E7\u05DC\u05D5\u05E4\u05D3\u05D9\u05D4</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr" style="width: 120px;">before|    \u05D0\u05D7\u05E8\u05D9 \u05D0\u05E0\u05E6\u05D9\u05E7\u05DC\u05D5\u05E4\u05D3\u05D9\u05D4</div>',
  '19-9 ltr left character');

selection_test(
  '<div contenteditable dir="ltr" contenteditable style="width: 120px;">before    |\u05D0\u05D7\u05E8\u05D9 \u05D0\u05E0\u05E6\u05D9\u05E7\u05DC\u05D5\u05E4\u05D3\u05D9\u05D4</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr" style="width: 120px;">before|    \u05D0\u05D7\u05E8\u05D9 \u05D0\u05E0\u05E6\u05D9\u05E7\u05DC\u05D5\u05E4\u05D3\u05D9\u05D4</div>',
  '19-10 ltr left character');

selection_test(
  '<div contenteditable dir="ltr" contenteditable style="width: 120px;">before    \u05D0|\u05D7\u05E8\u05D9 \u05D0\u05E0\u05E6\u05D9\u05E7\u05DC\u05D5\u05E4\u05D3\u05D9\u05D4</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr" style="width: 120px;">before |   \u05D0\u05D7\u05E8\u05D9 \u05D0\u05E0\u05E6\u05D9\u05E7\u05DC\u05D5\u05E4\u05D3\u05D9\u05D4</div>',
  '19-11 ltr left character');

selection_test(
  '<div contenteditable dir="ltr" contenteditable style="width: 120px;">before    \u05D0\u05D7|\u05E8\u05D9 \u05D0\u05E0\u05E6\u05D9\u05E7\u05DC\u05D5\u05E4\u05D3\u05D9\u05D4</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr" style="width: 120px;">before    \u05D0|\u05D7\u05E8\u05D9 \u05D0\u05E0\u05E6\u05D9\u05E7\u05DC\u05D5\u05E4\u05D3\u05D9\u05D4</div>',
  '19-12 ltr left character');

selection_test(
  '<div contenteditable dir="ltr" contenteditable style="width: 120px;">before    \u05D0\u05D7\u05E8|\u05D9 \u05D0\u05E0\u05E6\u05D9\u05E7\u05DC\u05D5\u05E4\u05D3\u05D9\u05D4</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr" style="width: 120px;">before    \u05D0\u05D7|\u05E8\u05D9 \u05D0\u05E0\u05E6\u05D9\u05E7\u05DC\u05D5\u05E4\u05D3\u05D9\u05D4</div>',
  '19-13 ltr left character');

selection_test(
  '<div contenteditable dir="ltr" contenteditable style="width: 120px;">before    \u05D0\u05D7\u05E8\u05D9| \u05D0\u05E0\u05E6\u05D9\u05E7\u05DC\u05D5\u05E4\u05D3\u05D9\u05D4</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr" style="width: 120px;">before    \u05D0\u05D7\u05E8|\u05D9 \u05D0\u05E0\u05E6\u05D9\u05E7\u05DC\u05D5\u05E4\u05D3\u05D9\u05D4</div>',
  '19-14 ltr left character');

selection_test(
  '<div contenteditable dir="ltr" contenteditable style="width: 120px;">before    \u05D0\u05D7\u05E8\u05D9 |\u05D0\u05E0\u05E6\u05D9\u05E7\u05DC\u05D5\u05E4\u05D3\u05D9\u05D4</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr" style="width: 120px;">before    \u05D0\u05D7\u05E8\u05D9| \u05D0\u05E0\u05E6\u05D9\u05E7\u05DC\u05D5\u05E4\u05D3\u05D9\u05D4</div>',
  '19-15 ltr left character');

selection_test(
  '<div contenteditable dir="ltr" contenteditable style="width: 120px;">before    \u05D0\u05D7\u05E8\u05D9 \u05D0|\u05E0\u05E6\u05D9\u05E7\u05DC\u05D5\u05E4\u05D3\u05D9\u05D4</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr" style="width: 120px;">before    \u05D0\u05D7\u05E8\u05D9 |\u05D0\u05E0\u05E6\u05D9\u05E7\u05DC\u05D5\u05E4\u05D3\u05D9\u05D4</div>',
  '19-16 ltr left character');

selection_test(
  '<div contenteditable dir="ltr" contenteditable style="width: 120px;">before    \u05D0\u05D7\u05E8\u05D9 \u05D0\u05E0|\u05E6\u05D9\u05E7\u05DC\u05D5\u05E4\u05D3\u05D9\u05D4</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr" style="width: 120px;">before    \u05D0\u05D7\u05E8\u05D9 \u05D0|\u05E0\u05E6\u05D9\u05E7\u05DC\u05D5\u05E4\u05D3\u05D9\u05D4</div>',
  '19-17 ltr left character');

selection_test(
  '<div contenteditable dir="ltr" contenteditable style="width: 120px;">before    \u05D0\u05D7\u05E8\u05D9 \u05D0\u05E0\u05E6|\u05D9\u05E7\u05DC\u05D5\u05E4\u05D3\u05D9\u05D4</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr" style="width: 120px;">before    \u05D0\u05D7\u05E8\u05D9 \u05D0\u05E0|\u05E6\u05D9\u05E7\u05DC\u05D5\u05E4\u05D3\u05D9\u05D4</div>',
  '19-18 ltr left character');

selection_test(
  '<div contenteditable dir="ltr" contenteditable style="width: 120px;">before    \u05D0\u05D7\u05E8\u05D9 \u05D0\u05E0\u05E6\u05D9|\u05E7\u05DC\u05D5\u05E4\u05D3\u05D9\u05D4</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr" style="width: 120px;">before    \u05D0\u05D7\u05E8\u05D9 \u05D0\u05E0\u05E6|\u05D9\u05E7\u05DC\u05D5\u05E4\u05D3\u05D9\u05D4</div>',
  '19-19 ltr left character');

selection_test(
  '<div contenteditable dir="ltr" contenteditable style="width: 120px;">before    \u05D0\u05D7\u05E8\u05D9 \u05D0\u05E0\u05E6\u05D9\u05E7|\u05DC\u05D5\u05E4\u05D3\u05D9\u05D4</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr" style="width: 120px;">before    \u05D0\u05D7\u05E8\u05D9 \u05D0\u05E0\u05E6\u05D9|\u05E7\u05DC\u05D5\u05E4\u05D3\u05D9\u05D4</div>',
  '19-20 ltr left character');

selection_test(
  '<div contenteditable dir="ltr" contenteditable style="width: 120px;">before    \u05D0\u05D7\u05E8\u05D9 \u05D0\u05E0\u05E6\u05D9\u05E7\u05DC|\u05D5\u05E4\u05D3\u05D9\u05D4</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr" style="width: 120px;">before    \u05D0\u05D7\u05E8\u05D9 \u05D0\u05E0\u05E6\u05D9\u05E7|\u05DC\u05D5\u05E4\u05D3\u05D9\u05D4</div>',
  '19-21 ltr left character');

selection_test(
  '<div contenteditable dir="ltr" contenteditable style="width: 120px;">before    \u05D0\u05D7\u05E8\u05D9 \u05D0\u05E0\u05E6\u05D9\u05E7\u05DC\u05D5|\u05E4\u05D3\u05D9\u05D4</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr" style="width: 120px;">before    \u05D0\u05D7\u05E8\u05D9 \u05D0\u05E0\u05E6\u05D9\u05E7\u05DC|\u05D5\u05E4\u05D3\u05D9\u05D4</div>',
  '19-22 ltr left character');

selection_test(
  '<div contenteditable dir="ltr" contenteditable style="width: 120px;">before    \u05D0\u05D7\u05E8\u05D9 \u05D0\u05E0\u05E6\u05D9\u05E7\u05DC\u05D5\u05E4|\u05D3\u05D9\u05D4</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr" style="width: 120px;">before    \u05D0\u05D7\u05E8\u05D9 \u05D0\u05E0\u05E6\u05D9\u05E7\u05DC\u05D5|\u05E4\u05D3\u05D9\u05D4</div>',
  '19-23 ltr left character');

selection_test(
  '<div contenteditable dir="ltr" contenteditable style="width: 120px;">before    \u05D0\u05D7\u05E8\u05D9 \u05D0\u05E0\u05E6\u05D9\u05E7\u05DC\u05D5\u05E4\u05D3|\u05D9\u05D4</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr" style="width: 120px;">before    \u05D0\u05D7\u05E8\u05D9 \u05D0\u05E0\u05E6\u05D9\u05E7\u05DC\u05D5\u05E4|\u05D3\u05D9\u05D4</div>',
  '19-24 ltr left character');

selection_test(
  '<div contenteditable dir="ltr" contenteditable style="width: 120px;">before    \u05D0\u05D7\u05E8\u05D9 \u05D0\u05E0\u05E6\u05D9\u05E7\u05DC\u05D5\u05E4\u05D3\u05D9|\u05D4</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr" style="width: 120px;">before    \u05D0\u05D7\u05E8\u05D9 \u05D0\u05E0\u05E6\u05D9\u05E7\u05DC\u05D5\u05E4\u05D3|\u05D9\u05D4</div>',
  '19-25 ltr left character');

selection_test(
  '<div contenteditable dir="ltr" contenteditable style="width: 120px;">before    \u05D0\u05D7\u05E8\u05D9 \u05D0\u05E0\u05E6\u05D9\u05E7\u05DC\u05D5\u05E4\u05D3\u05D9\u05D4|</div>',
  selection => selection.modify('move', 'left', 'character'),
  '<div contenteditable dir="ltr" style="width: 120px;">before    \u05D0\u05D7\u05E8\u05D9 \u05D0\u05E0\u05E6\u05D9\u05E7\u05DC\u05D5\u05E4\u05D3\u05D9|\u05D4</div>',
  '19-26 ltr left character');
</script>
